package com.example.lasttrain;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MenuItem.OnMenuItemClickListener;
import android.webkit.WebView;

public class JorudanViewActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_jorudan_view);

        WebView webView1 = (WebView)findViewById(R.id.webView2);
        webView1.loadUrl("http://www.jorudan.co.jp/");
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
//        getMenuInflater().inflate(R.menu.activity_route_view, menu);
//        return true;
    	
        MenuItem pref_item = menu.add("アラーム設定画面へ");
        OnMenuItemClickListener listener = new OnMenuItemClickListener() {
            public boolean onMenuItemClick(MenuItem item) {
                openPref();
                return false;
            }
        };
        pref_item.setOnMenuItemClickListener(listener);
        return true;
    }
     
    public void openPref(){
        Intent intent = new Intent(this, (Class<?>)AlarmActivity.class);
        startActivity(intent);
    }
    	
}
